//
//  LSPubulishBottomReusableView.m
//  LookScore
//
//  Created by wws on 2018/5/9.
//  Copyright © 2018年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSPubulishBottomReusableView.h"

@implementation LSPubulishBottomReusableView

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        UIButton * allBtn = [[UIButton alloc] init];
        allBtn.layer.cornerRadius = 10;
        allBtn.layer.borderWidth = 0.5;
        allBtn.layer.borderColor = Color(255, 170, 0).CGColor;
        [allBtn setTitle:@"全部" forState:UIControlStateNormal];
        [allBtn addTarget:self action:@selector(allBtnClicked:) forControlEvents:UIControlEventTouchUpInside];
        [allBtn setBackgroundColor:Color(250,230,189)];
        allBtn.tag = 1000+1;
        allBtn.titleLabel.font = LSFontSize12;
        [allBtn setTitleColor:Color(255, 170, 0) forState:UIControlStateNormal];
        [self addSubview:allBtn];
        allBtn.sd_layout
        .leftSpaceToView(self, 7)
        .topSpaceToView(self, 7)
        .bottomSpaceToView(self, 7)
        .widthIs((self.frame.size.width-28)/2);
        
        UIButton * noAllBtn = [[UIButton alloc] init];
        noAllBtn.layer.cornerRadius = 10;
        noAllBtn.layer.borderWidth = 0.5;
        noAllBtn.layer.borderColor = Color(197,226,248).CGColor;
        [noAllBtn setTitle:@"不针对比赛" forState:UIControlStateNormal];
        [noAllBtn setBackgroundColor:Color(197,226,248)];
        noAllBtn.titleLabel.font = LSFontSize12;
        noAllBtn.tag = 1000+2;
        [noAllBtn setTitleColor:Color(33,134,211) forState:UIControlStateNormal];
        [noAllBtn addTarget:self action:@selector(noAllBtnClicked:) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:noAllBtn];
        noAllBtn.sd_layout
        .rightSpaceToView(self, 7)
        .topSpaceToView(self, 7)
        .bottomSpaceToView(self, 7)
        .widthIs((self.frame.size.width-28)/2);
    }
    return self;
}


- (void)allBtnClicked:(UIButton *)sender{
    
    self.block(sender);
    
}


- (void)noAllBtnClicked:(UIButton *)sender{
    self.block(sender);
    
}
@end
